<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<link rel="stylesheet" href="resources/css/jquery-ui-1.8.21.custom.css">
<script src="resources/js/jquery-1.7.2.min.js"></script>
<script src="resources/js/jquery-ui-1.8.21.custom.min.js"></script>
</head>
<body>
<div id="cbnuButtons">
        	<h2>refresh 메소드 실습</h2>
	    	<label for="cbnu1">CBNU1</label><input id="cbnu1" type="checkbox">
    	    <label for="cbnu2">CBNU2</label><input id="cbnu2" type="checkbox">
        	<label for="cbnu3">CBNU3</label><input id="cbnu3" type="checkbox">
	        <label for="cbnu4">CBNU4</label><input id="cbnu4" type="checkbox">
        </div>
        <br>
        <button id="ALL">모두선택</button>
        <button id="refresh">선택해제</button>  

<script type="text/javascript">
			$(function(){

				$("#cbnuButtons").buttonset();

				$("#ALL").button().click(function() {
					$("#cbnuButtons").find("input").attr("checked", true).button("refresh");
				});
				
				$("#refresh").button().click(function() {
					$("#cbnuButtons").find("input").attr("checked", false).button("refresh");
				});
			});		
</script>
</body>
</html>